package com.jcw.kqxt.mapper;

import com.jcw.kqxt.domain.Attendance;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.jcw.kqxt.dto.AttendanceDto;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author qinhui
 * @since 2022-02-25
 */
@Mapper
public interface AttendanceMapper extends BaseMapper<Attendance> {

    /**
     * 根据dto条件查询考勤集合
     * @param deptId 部门id
     * @param date 日期
     * @return
     */
    List<Attendance> selectListByDeptIdAndDate(Long deptId,String date);

    List<Attendance> selectListByDeptIdAndNameAndDate(Integer deptId,String name,String date);

    //查询对应参数的数据
    Attendance selectOneModel(AttendanceDto dto);

    Long selectUserIdByUserName(String name);

    Integer selectDeptIdByDeptNameAndName(String deptName,String name);

    List<Attendance> selectListByDate(String date);
}
